/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package entities;

import java.io.Serializable;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.util.List;
import javax.persistence.Basic;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 *
 * @author Alejandro
 */
@Entity
@Table(name = "TIPO_PAGO")
@NamedQueries({
    @NamedQuery(name = "TipoPago.findAll", query = "SELECT t FROM TipoPago t")})
public class TipoPago implements Serializable {
    private static final long serialVersionUID = 1L;
    // @Max(value=?)  @Min(value=?)//if you know range of your decimal fields consider using these annotations to enforce field validation
    @Id
    @Basic(optional = false)
    @Column(name = "ID_TIPO_PAGO")
    private BigDecimal idTipoPago;
    @Column(name = "MONTO_RECIBIDO")
    private BigInteger montoRecibido;
    @Column(name = "MONTO_DEVUELTO")
    private BigInteger montoDevuelto;
    @Column(name = "BANCO")
    private String banco;
    @Column(name = "NUMERO_TARJETA")
    private String numeroTarjeta;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "tipoPagoIdTipoPago")
    private List<Tiquete> tiqueteList;

    public TipoPago() {
    }

    public TipoPago(BigDecimal idTipoPago) {
        this.idTipoPago = idTipoPago;
    }

    public BigDecimal getIdTipoPago() {
        return idTipoPago;
    }

    public void setIdTipoPago(BigDecimal idTipoPago) {
        this.idTipoPago = idTipoPago;
    }

    public BigInteger getMontoRecibido() {
        return montoRecibido;
    }

    public void setMontoRecibido(BigInteger montoRecibido) {
        this.montoRecibido = montoRecibido;
    }

    public BigInteger getMontoDevuelto() {
        return montoDevuelto;
    }

    public void setMontoDevuelto(BigInteger montoDevuelto) {
        this.montoDevuelto = montoDevuelto;
    }

    public String getBanco() {
        return banco;
    }

    public void setBanco(String banco) {
        this.banco = banco;
    }

    public String getNumeroTarjeta() {
        return numeroTarjeta;
    }

    public void setNumeroTarjeta(String numeroTarjeta) {
        this.numeroTarjeta = numeroTarjeta;
    }

    public List<Tiquete> getTiqueteList() {
        return tiqueteList;
    }

    public void setTiqueteList(List<Tiquete> tiqueteList) {
        this.tiqueteList = tiqueteList;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idTipoPago != null ? idTipoPago.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof TipoPago)) {
            return false;
        }
        TipoPago other = (TipoPago) object;
        if ((this.idTipoPago == null && other.idTipoPago != null) || (this.idTipoPago != null && !this.idTipoPago.equals(other.idTipoPago))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "entities.TipoPago[ idTipoPago=" + idTipoPago + " ]";
    }
    
}
